/** 
* All Rights Reserved , Copyright (C) 2021 , 青岛鼎信通讯股份有限公司
* 
* SdProjectTeamServiceAuto
* SD项目任命-项目组成员
* 
* 修改纪录
* 2021-12-08 版本：1.0 wangxinhua 创建。
* @version 版本：1.0
* @author 作者：wangxinhua
* 创建日期：2021-12-08
*/

package com.topscomm.gpm.service.impl.auto;

import javax.annotation.Resource;
import com.topscomm.basic.IBasicDao;
import com.topscomm.tap.common.DatacodeCache;
import java.util.Map;
import com.topscomm.gpm.*;
import com.topscomm.gpm.pojo.GpmProjectTeamEntity;
import com.topscomm.gpm.dao.IGpmProjectTeamDao;


public class GpmProjectTeamServiceAuto extends GpmService<GpmProjectTeamEntity, IGpmProjectTeamDao> {
	
	/**
	 * @author: wangxinhua
	 * @date: 2021-12-08
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("state") != null) {
			temp = mapRow.get("state").toString();
			mapRow.put("dispstate", datacodeCache.getValueDynamic("TapApprovalBillState", temp, "code", "name"));
		}
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
		if (mapRow.get("appointmenttype") != null) {
			temp = mapRow.get("appointmenttype").toString();
			mapRow.put("dispappointmenttype", datacodeCache.getValueDynamic("GpmAppointmentType", temp, "code", "name"));
		}
		if (mapRow.get("projectrole") != null) {
			temp = mapRow.get("projectrole").toString();
			mapRow.put("dispprojectrole", datacodeCache.getValueDynamic("GpmProjectRole", temp, "code", "name"));
		}
		if (mapRow.get("workgroup") != null) {
			temp = mapRow.get("workgroup").toString();
			mapRow.put("dispworkgroup", datacodeCache.getValueDynamic("GpmWorkGroup", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "sdProjectTeamDao")
	public void setDao(IBasicDao<GpmProjectTeamEntity> dao) {
		super.setDao(dao);
	}
}
